<!DOCTYPE html>
<head>
    <#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
    <#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
    <#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
    <#assign DutyDept = JspTaglibs["http://www.casic304.cn/DutyDept"]/>
    <meta charset="utf-8">
    <title>质量评审管理基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">

    <link rel="stylesheet" href="${ctx}/qbdmsStatic/public/ztree/zTreeStyle.css"/>
    <script src="${ctx}/qbdmsStatic/public/ztree/jquery.min.js"></script>
    <script src="${ctx}/qbdmsStatic/public/ztree/jquery.ztree.all.min.js"></script>

    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .aa{
            position: relative;
            padding-right: 68px;
            box-sizing: border-box;
        }
        .bb{
            position: absolute;
            rigth: 0;
            /* float: right; */
            top: 0px;
            right: 0px;
        }
    </style>
</head>
<body class="listBody">
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body">
        <form class="layui-form formPreview"  requrl="${ctx}/qbdms/wQbdQualityReview/get?flag=${flag}" lay-filter="wQbdQualityReviewDataForm" id="wQbdQualityReviewDataForm">
            <div class="layui-hide">
                <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input " maxlength="50">
                <input name="filldeptid" value="${filldeptid}" style="display: none"/>
                <input name="filldept" value="${filldept}" style="display: none"/>
                <input name="fillmanaccount" value="${fillmanaccount}" style="display: none"/>
                <input name="fillman" value="${fillman}" style="display: none"/>
                <input name="filldate" value="${filldate}" style="display: none"/>
                <input name="flowStatus" value="${flowStatus}" style="display: none"/>
<!--                <input name="flag" value="${flag}" style="display: none" >-->
            </div>

            <div class="qbdms-formTitle">质量评审管理 <i class="qbdms-returnOn closeWindow" id="back">返回</i></div>
            <#if bpm_xhzly=true>
            <div class="qbdms-formBody">
                <div class="layui-row">
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="密级">密级<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@secSelect.sec_select data_src=1 required=true name="secret" id="secret"/>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="型号">型号<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select id="model" name="model" class="layui-input filter-value" lay-search="" lay-verify="required" lay-reqtext="型号是必填项" lay-filter="xh" maxlength="50"></select>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="专业">专业<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select id="major" name="major" class="layui-input filter-value" lay-search="" lay-verify="required" lay-reqtext="专业是必填项" lay-filter="xh" maxlength="50"></select>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审时间">评审时间<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input id = "reviewdate" type="text" placeholder="请选择" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="reviewdate" lay-verify="required" lay-reqtext="评审时间是必填项" maxlength="7">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审项目名称">评审项目名称<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" placeholder="请输入" autocomplete="off" class="layui-input textInput" name="reviewprojectname" lay-verify="required" lay-reqtext="评审项目名称是必填项"  maxlength="32">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="责任单位"><span style="color: red;">*</span>责任单位</label>
                        <div class="layui-input-block qbdms-input">
                            <select id="dutydeptid" name="dutydeptid" autocomplete="off"
                                    class="layui-input" lay-filter="dutydeptid"
                                    fieldname="dutydeptid" lay-verify="required"
                                    lay-reqtext="责任单位是必填项">
                            </select>
                        </div>
                        <input type="hidden" name="dutydept" id="dutydept">
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审级别">评审级别<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select  id="reviewlevel" name="reviewlevel" lay-verify="required" lay-reqtext="评审级别是必填项" lay-filter="reviewlevel" lay-search=""></select>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审地点">评审地点</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" placeholder="请输入" autocomplete="off" class="layui-input textInput" name="reviewplace" maxlength="32">
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审结论">评审结论<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select  id="reviewresult" name="reviewresult" lay-verify="required" lay-reqtext="评审结论是必填项"   lay-filter="reviewresult" lay-search=""></select>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="评审类别">评审类别<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select  id="reviewcategory" name="reviewcategory"  lay-filter="reviewcategory" lay-search="" lay-verify="required" lay-reqtext="评审类别是必填项"></select>
                        </div>
                    </div>
                    <div class="qbdms-oneForm">
                        <label class="layui-form-label qbdms-label" title="是否存在问题">是否存在问题<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select  id="hasproblem" name="hasproblem"  lay-verify="required" lay-reqtext="是否存在问题是必填项"  lay-filter="hasproblem" lay-search=""></select>
                        </div>
                    </div>
                    <div class="qbdms-textarea">
                        <label class="layui-form-label qbdms-label">评审证明文件<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <div class="doNotDelThisDiv layui-input-inline">
                                <div class="uploadFileCont">
                                    <input type="button"
                                           class="layui-btn fileUpload qbdms-fileUp iconfont iconupload"
                                           value="上传附件" id="supportdocList" name="supportdocList">
                                    <i class="qbdms-fileUpText">单个附件，附件格式：doc,docx,pdf，附件大小限制：100M</i>
                                    <input type="text" id="supportdoc" class="uploadInput" name="supportdoc"  lay-verify="required" lay-reqtext="评审证明文件是必填项"  style="display: none">
                                    <div class="uploadFileList" fileUploadName="supportdoc"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--                    <div class="qbdms-textarea">-->
                    <!--                        <label class="layui-form-label qbdms-label">评审问题描述</label>-->
                    <!--                        <div class="layui-input-block qbdms-input">-->
                    <!--                            <textarea rows="2" class="layui-textarea" placeholder="请输入" name="probleminfo" maxlength="160"></textarea>-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <!--                            <div class="qbdms-oneForm">-->
                    <!--                                <label class="layui-form-label qbdms-label" title="计划完成时间">计划完成时间</label>-->
                    <!--                                <div class="layui-input-block qbdms-input">-->
                    <!--                                    <input id = "finishtime" type="text" placeholder="请输入" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="finishtime" maxlength="7">-->
                    <!--                                </div>-->
                    <!--                            </div>-->
                    <!--                    <div class="qbdms-oneForm  ">-->
                    <!--                        <label class="layui-form-label qbdms-label" title="责任人">责任人</label>-->
                    <!--                        <button type="button" typeid="4" class="layui-btn qbdms-twoBtn selectorBtn" id = "dutypersonbn">选择</button>-->
                    <!--                        <div class="layui-input-block qbdms-input qbdms-inputIsButton">-->
                    <!--                            <input type="text" name="dutyperson" readonly="readonly" placeholder="请选择"-->
                    <!--                                   autocomplete="off" class="layui-input  selectorInput"-->
                    <!--                                   maxlength="30" fieldname="dutyperson">-->
                    <!--                            <input type="hidden" name="dutypersonid" placeholder="责任人ID"-->
                    <!--                                   autocomplete="off" class="layui-input  textInput getIds"-->
                    <!--                                   maxlength="100" fieldname="dutydeptid">-->
                    <!--                        </div>-->
                    <!--                    </div>-->
                    <!--                    <#if isInclude=='true'>-->
                    <!--                    <#include "/wQbdQualityReview/two.html">-->
                    <!--                </#if>-->
                </div>
            </div>
            <p class="qbdms-SubTableTitle"><span>质量评审信息子表</span></p>
            <div class="qbdms-tableDiv">
                <a modetype="2" class="addFormTr1"
                   id="add">
                    <i class="layui-icon layui-icon-addition"></i>新增
                </a>
                <table class="qbdms-temTable wQbdQualityRevSuList subFormTable"
                       id="wQbdQualityRevSuList" style="min-width: 1360px;">
                    <tbody>
                    <tr class="temSpace qbdms-temTable-thead">
                        <td class="temSpace" style="width: 30px;">
                            序号
                        </td>
                        <td class="temSpace subDialogShowState" style="width: 120px">
                            评审问题描述
                        </td>
                        <td class="temSpace subDialogShowState" style="width: 120px">
                            计划完成时间
                        </td>
                        <td class="temSpace subDialogShowState" style="width: 120px">
                            责任人
                        </td>
                        <!--                <td class="temSpace subDialogShowState" style="width: 120px">-->
                        <!--                    解决措施<span style="color: red;">*</span>-->
                        <!--                </td>-->
                        <!--                <td class="temSpace subDialogShowState" style="width: 120px">-->
                        <!--                    完成情况<span style="color: red;">*</span>-->
                        <!--                </td>-->
                        <td class="temSpace qbdms-subOptState">
                            管理
                        </td>
                    </tr>
                    <tr class="temSpace subContTem">
                        <td class="temSpace qbdms-temTable-seNumber">
                            <div class="temTag">0</div>
                        </td>
                        <td class="temSpace qbdms-temTable-td">

                            <input type="text" placeholder="请输入"
                                   autocomplete="off"
                                   class="layui-input textInput reviewproblem"
                                   name="s:wQbdQualityRevSuList:reviewproblem"
                                   maxlength="50"  >
                        </td>
                        <td class="temSpace qbdms-temTable-td">
                            <input type="text" placeholder="请选择" requiredFlag=""
                                   autocomplete="off" class="layui-input datetime"
                                   lay-reqtext="年度是必填项"
                                   name="s:wQbdQualityRevSuList:planfinshtime">
                        </td>

                        </td>
                        <td class="temSpace qbdms-temTable-td">
                            <div  class="aa">
                                <button  type="button" typeid="4" class="layui-btn qbdms-twoBtn selectorBtn bb" id = "dutypersonbn">选择</button>
                                <input type="text" name="s:wQbdQualityRevSuList:persionuser" readonly="readonly" placeholder="请选择"
                                       autocomplete="off" class="layui-input  selectorInput"
                                       maxlength="30" fieldname="persionuser">
                                <input type="hidden" name="s:wQbdQualityRevSuList:persionuserId"  placeholder="责任人ID"
                                       autocomplete="off" class="layui-input  textInput getIds"
                                       maxlength="100" fieldname="persionuserId">
                            </div>
                        </td>
                        <!--                <td class="temSpace qbdms-temTable-td">-->
                        <!--                    <input type="text" placeholder="请输入"-->
                        <!--                           autocomplete="off"-->
                        <!--                           class="layui-input textInput solutions"-->
                        <!--                           name="s:wQbdQualityRevSuList:solutions"-->
                        <!--                           maxlength="50"  requiredFlag="required" lay-reqtext="解决措施为必填项">-->
                        <!--                </td>-->
                        <!--                <td class="temSpace qbdms-temTable-td">-->
                        <!--                    <input type="text" placeholder="请输入"-->
                        <!--                           autocomplete="off"-->
                        <!--                           class="layui-input textInput completionstatus"-->
                        <!--                           name="s:wQbdQualityRevSuList:completionstatus"-->
                        <!--                           maxlength="50"  requiredFlag="required" lay-reqtext="完成情况为必填项">-->
                        <!--                </td>-->

                        <td class="temSpace qbdms-subOptState">
                            <a class="subDeleteTr RightBtn">删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </#if>
        <#if bpm_xhzly=false>
        <!--            禁止输入start-->
        <div class="qbdms-formBody">
            <div class="layui-row">
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="密级">密级<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <@secSelect.sec_select data_src=1 activity=false required=true name="secret" id="secret"/>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="型号">型号<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <select id="model" name="model" class="layui-input filter-value" lay-search="" lay-verify="required" lay-reqtext="型号是必填项" lay-filter="xh" maxlength="50" disabled></select>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="专业">专业<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <select id="major" name="major" class="layui-input filter-value" lay-search="" lay-verify="required" lay-reqtext="专业是必填项" lay-filter="xh" maxlength="50" disabled></select>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审时间">评审时间<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <input id = "reviewdate" type="text" placeholder="请输入" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="reviewdate" lay-verify="required" lay-reqtext="评审时间是必填项" maxlength="7" disabled>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审项目名称">评审项目名称<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <input type="text" placeholder="请输入" autocomplete="off" class="layui-input textInput" name="reviewprojectname" lay-verify="required" lay-reqtext="评审项目名称是必填项"  maxlength="32" disabled>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="责任单位"><span style="color: red;">*</span>责任单位</label>
                    <div class="layui-input-block qbdms-input">
                        <select id="dutydeptid" name="dutydeptid" autocomplete="off"
                                class="layui-input" lay-filter="dutydeptid"
                                fieldname="dutydeptid" lay-verify="required"
                                lay-reqtext="责任单位是必填项" disabled>
                        </select>
                    </div>
                    <input type="hidden" name="dutydept" id="dutydept">
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审级别">评审级别<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <select  id="reviewlevel" name="reviewlevel" lay-verify="required" lay-reqtext="评审级别是必填项" lay-filter="reviewlevel" lay-search="" disabled></select>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审地点">评审地点</label>
                    <div class="layui-input-block qbdms-input">
                        <input type="text" placeholder="请输入" autocomplete="off" class="layui-input textInput" name="reviewplace" maxlength="32" disabled>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审结论">评审结论<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <select  id="reviewresult" name="reviewresult" lay-verify="required" lay-reqtext="评审结论是必填项"   lay-filter="reviewresult" lay-search="" disabled></select>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="评审类别">评审类别</label>
                    <div class="layui-input-block qbdms-input">
                        <select  id="reviewcategory" name="reviewcategory"    lay-filter="reviewcategory" lay-search="" disabled></select>
                    </div>
                </div>
                <div class="qbdms-oneForm">
                    <label class="layui-form-label qbdms-label" title="是否存在问题">是否存在问题<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <select  id="hasproblem" name="hasproblem"  lay-verify="required" lay-reqtext="是否存在问题是必填项"  lay-filter="hasproblem" lay-search="" disabled></select>
                    </div>
                </div>
                <div class="qbdms-textarea">
                    <label class="layui-form-label qbdms-label">评审证明文件<span style="color: red;">*</span></label>
                    <div class="layui-input-block qbdms-input">
                        <div class="doNotDelThisDiv layui-input-inline">
                            <div class="uploadFileCont">
                                <!--                                    <input type="button"-->
                                <!--                                           class="layui-btn fileUpload qbdms-fileUp iconfont iconupload"-->
                                <!--                                           value="上传附件" id="supportdocList" name="supportdocList">-->
                                <!--                                    <i class="qbdms-fileUpText">单个附件，附件格式：doc,docx,pdf，附件大小限制：100M</i>-->
                                <input type="text" id="supportdoc" class="uploadInput" name="supportdoc"  lay-verify="required" lay-reqtext="评审证明文件是必填项"  style="display: none">
                                <div class="uploadFileList" fileUploadName="supportdoc"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--                    <div class="qbdms-textarea">-->
                <!--                        <label class="layui-form-label qbdms-label">评审问题描述</label>-->
                <!--                        <div class="layui-input-block qbdms-input">-->
                <!--                            <textarea rows="2" class="layui-textarea" placeholder="请输入" name="probleminfo" maxlength="160"></textarea>-->
                <!--                        </div>-->
                <!--                    </div>-->
                <!--                            <div class="qbdms-oneForm">-->
                <!--                                <label class="layui-form-label qbdms-label" title="计划完成时间">计划完成时间</label>-->
                <!--                                <div class="layui-input-block qbdms-input">-->
                <!--                                    <input id = "finishtime" type="text" placeholder="请输入" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="finishtime" maxlength="7">-->
                <!--                                </div>-->
                <!--                            </div>-->
                <!--                    <div class="qbdms-oneForm  ">-->
                <!--                        <label class="layui-form-label qbdms-label" title="责任人">责任人</label>-->
                <!--                        <button type="button" typeid="4" class="layui-btn qbdms-twoBtn selectorBtn" id = "dutypersonbn">选择</button>-->
                <!--                        <div class="layui-input-block qbdms-input qbdms-inputIsButton">-->
                <!--                            <input type="text" name="dutyperson" readonly="readonly" placeholder="请选择"-->
                <!--                                   autocomplete="off" class="layui-input  selectorInput"-->
                <!--                                   maxlength="30" fieldname="dutyperson">-->
                <!--                            <input type="hidden" name="dutypersonid" placeholder="责任人ID"-->
                <!--                                   autocomplete="off" class="layui-input  textInput getIds"-->
                <!--                                   maxlength="100" fieldname="dutydeptid">-->
                <!--                        </div>-->
                <!--                    </div>-->
                <!--                    <#if isInclude=='true'>-->
                <!--                    <#include "/wQbdQualityReview/two.html">-->
                <!--                </#if>-->
            </div>
        </div>
        <p class="qbdms-SubTableTitle"><span>质量评审信息子表</span></p>
        <div class="qbdms-tableDiv">
            <a modetype="2" class="addFormTr1"
               id="add" style="display: none">
                <i class="layui-icon layui-icon-addition"></i>新增
            </a>
            <table class="qbdms-temTable wQbdQualityRevSuList subFormTable"
                   id="wQbdQualityRevSuList" style="min-width: 1360px;">
                <tbody>
                <tr class="temSpace qbdms-temTable-thead">
                    <td class="temSpace" style="width: 30px;">
                        序号
                    </td>
                    <td class="temSpace subDialogShowState" style="width: 120px">
                        评审问题描述
                    </td>
                    <td class="temSpace subDialogShowState" style="width: 120px">
                        计划完成时间
                    </td>
                    <td class="temSpace subDialogShowState" style="width: 120px">
                        责任人
                    </td>
                    <td class="temSpace subDialogShowState" style="width: 120px">
                        解决措施<span style="color: red;">*</span>
                    </td>
                    <td class="temSpace subDialogShowState" style="width: 120px">
                        完成情况<span style="color: red;">*</span>
                    </td>


                </tr>
                <tr class="temSpace subContTem">
                    <td class="temSpace qbdms-temTable-seNumber">
                        <div class="temTag">0</div>
                    </td>
                    <td class="temSpace qbdms-temTable-td">
                        <input type="hidden" name="s:wQbdQualityRevSuList:id">
                        <input type="text" placeholder="请输入"
                               autocomplete="off"
                               class="layui-input textInput reviewproblem"
                               name="s:wQbdQualityRevSuList:reviewproblem"
                               maxlength="50"  disabled >
                    </td>
                    <td class="temSpace qbdms-temTable-td">
                        <input type="text" placeholder="请选择" requiredFlag=""
                               autocomplete="off" class="layui-input datetime"
                               lay-reqtext="年度是必填项"
                               name="s:wQbdQualityRevSuList:planfinshtime" disabled>
                    </td>

                    </td>
                    <td class="temSpace qbdms-temTable-td">
                        <div  class="aa">
                            <!--                                <button  type="button" typeid="4" class="layui-btn qbdms-twoBtn selectorBtn bb" id = "dutypersonbn">选择</button>-->
                            <input type="text" name="s:wQbdQualityRevSuList:persionuser" readonly="readonly" placeholder="请选择"
                                   autocomplete="off" class="layui-input  selectorInput"
                                   maxlength="30" fieldname="persionuser">
                            <input type="hidden" name="s:wQbdQualityRevSuList:persionuserId"  placeholder="责任人ID"
                                   autocomplete="off" class="layui-input  textInput getIds"
                                   maxlength="100" fieldname="persionuserId" disabled>
                        </div>
                    </td>
                    <!--            禁止输入end-->
                    <td class="temSpace qbdms-temTable-td">
                        <input type="text" placeholder="请输入"
                               autocomplete="off"
                               class="layui-input textInput solutions"
                               name="s:wQbdQualityRevSuList:solutions"
                               maxlength="50"  requiredFlag="required" lay-reqtext="解决措施为必填项">
                    </td>
                    <td class="temSpace qbdms-temTable-td">
                        <input type="text" placeholder="请输入"
                               autocomplete="off"
                               class="layui-input textInput completionstatus"
                               name="s:wQbdQualityRevSuList:completionstatus"
                               maxlength="50"  requiredFlag="required" lay-reqtext="完成情况为必填项">
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </#if>
    <div class="layui-form-item btnformItem">
        <p>
            <span id="hideAndShow" style="display: none;">
                <a lay-submit lay-filter="wQbdQualityReview" class="layui-btn btn-n privateSubmit qbdms-oneBtn" requrl="${ctx}/qbdms/wQbdQualityReview/save" id="urlFormSave">保存</a>
                <a lay-filter="wProblemresetMsg" id="run" class="layui-btn btn-n qbdms-oneBtn">启动</a>
                <button type="reset" id="closeWindow" style="margin-left: 10px;" class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">取消</button>
            </span>
        </p>
    </div>
    </form>
</div>
</div>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    var vaildFlag ;
    var runFlag=false;
    var flowStatus="${flowStatus}";
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'setter', 'layer', 'propsHandle', 'upload', 'common', 'laydate', 'jquery', 'publicMethods', 'qbdmsForm'], function () {
        var $ = layui.jquery,
            laydate = layui.laydate,
            setter = layui.setter,  // 配置信息
            layer = layui.layer,
            common = layui.common,
            propsHandle = layui.propsHandle,
            upload = layui.upload,
            publicMethods = layui.publicMethods,
            formId = '' || '',
            defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                initCss: [
                    'style/currencyCss'
                ],
                // formAreaInfo:'.formPreview',
                formAreaInfo: 'html',
                temDate: '.temDate',
                uploadFileBtn: '.uploadFileBtn',
                uploadImgBtn: '.uploadImgBtn',
                richTextArea: '.richTextArea',
                selectInput: '.selectInput',
                radioOptionCont: '.radioOptionCont',
                dataLexiTree: '.dataLexiTree',
                selectorBtn: '.selectorBtn',
            },
            temQuery = new propsHandle(),  // 实例化模板功能部分
            form = layui.qbdmsForm;
        // 初始化模板功能
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });

        if("${isInclude}"=="true") {
            $(".subContTem").hide();
            $(".qbdms-SubTableTitle").hide();
            $(".qbdms-tableDiv").hide();
            $("#secret").attr("disabled", true);
            $("#model").attr("disabled", true);
            $("#major").attr("disabled", true);
            $("#reviewprojectname").attr("disabled", true);
            $("#dutydeptid").attr("disabled", true);
            $("#reviewlevel").attr("disabled", true);
            $("#reviewplace").attr("disabled", true);
            $("#reviewresult").attr("disabled", true);
            $("#reviewcategory").attr("disabled", true);
            $("#hasproblem").attr("disabled", true);
            $("#probleminfo").attr("disabled", true);

            $("#reviewdate").attr("disabled", true);//上面要定义相应的id
            $("#supportdocList").attr("disabled", true);
            $("#finishtime").attr("disabled", true);
            $("#dutypersonbn").attr("disabled", true);
        }


        var flag='${flag}'

        //责任单位
        var researchRoomList =${researchRoomList};
        var researchRoom = function(optionObj, item){
            optionObj.text = item.orgName;
            optionObj.value = item.code;
        };
        common.initDicData("dutydeptid", researchRoomList, "", researchRoom);
        form.on('select(dutydeptid)', function (data) {
            console.log(data.elem[data.elem.selectedIndex].text);
            $("#dutydept").val(data.elem[data.elem.selectedIndex].text);
        });

        // 型号代号
        var xhdh = eval('${wQbdXhdhs}'); //型号代号
        var initXHDH = function (optionObj, item) {
            optionObj.text = item.fModelcode;
            optionObj.value = item.fModelcode;
            optionObj.setAttribute("xhmc", item.fModelname);
        };
        common.initDicData("model", xhdh, "", initXHDH);

        $(".subContTem").hide()
        // 子表初始化事件
        temQuery.initSubEvent(defProps, serverPath, setter);
        var dateTimeFiledLen = $(".dateTimeFiled");
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }
        //- 添加表单验证规则 开始 ---------------------------------------------------------------------
        form.verify({
            length100:[/^.{0,100}$/,'输入字符数不能超过100'],
            length2000:[/^.{0,2000}$/,'输入字符数不能超过2000'],
            fileRequired: function (value,item) {
                value = $(item).siblings(".uploadInput").val()
                if(!new RegExp(/[\S]+/).test(value)){
                    return common.verifyTitleAdd(item) +"没有上传对应附件"
                }
            },
            money: function (value,item) {
                if (value && !new RegExp(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/).test(value)) {
                    return common.verifyTitleAdd(item) +'请输入数字且小数最多两位';
                }
            },
            integer: function (value,item) {
                if (value && !new RegExp(/^[+]{0,1}(\d+)$/).test(value)) {
                    return common.verifyTitleAdd(item) + '请输入正整数';
                }
            }
        });
        //- 添加表单验证规则 结束 ---------------------------------------------------------------------

        vaildFlag = false;
        $("#urlFormSave").click(function () {
            vaildFlag=form.VerifyForm("wQbdQualityReviewDataForm");
        });

        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
        });

        //下载附件
        window.downFile = function (obj) {
            var fileId = $(obj).parents("span").attr("fileId");
            window.location.href = serverPath.qbdmsPath + setter.extendLinkPath + "attachFile/download?fileId=" + fileId;
        }
        // 删除
        $(document).on('click', '.deleteFile', function () {
            $(this).parent().parent().siblings("button").show()
            $(this).parent().remove();
            $(".uploadFileList").each(function (i, v) {
                common.constructFileStr(v)
            });
        });

        if(flowStatus == null || flowStatus == 0|| flowStatus==99){
            $("#hideAndShow").show();
        }else{
            $("#back").hide();
        }
        if(flowStatus==99){
            $("#run").hide();
        }
        var count = 1;
        $(document).on('click', '.addFormTr1', function () {
            count += 1;
            var modetype = $(this).attr('modetype'),
                copyObj = $(this).parent().children('.subFormTable'),
                copyHtm = copyObj.find('tr').eq(1);
            if (modetype === '2') {
                //在这里做一个转换，控制子表隐藏行的必填
                var copyHtmlStr = copyHtm.html();
                copyHtmlStr = copyHtmlStr.replace(/requiredflag/g, "lay-verify");
                // 表格
                copyObj.append('<tr class="temSpace">' + copyHtmlStr + '</tr>');
                // copyObj.append('<tr class="temSpace">' + copyHtm.html() + '</tr>');
                var trArr = copyObj.find('tr');
                trArr.eq(trArr.length - 1).find('td').eq(0).find('.temTag').html(trArr.length - 2);
                // trArr.eq(trArr.length - 1).find('td').eq(6).find('button').attr("id","fSkillcerfileList"+count);
                trArr.eq(trArr.length - 1).find('.fileUpload').attr("id", "fSkillcerfileList" + count);

                trArr.eq(trArr.length - 1).find('[isinit="1"]').each(function (i, item) {
                    $(item).attr('isinit', '2');
                });
                if (trArr.length > 3) {
                    trArr.eq(trArr.length - 1).find('[type=radio]').each(function (i, item) {
                        $(item).attr('name', (trArr.eq(1).find('[type=radio]').eq(i).attr('name')) + '_' + (trArr.length - 2))
                    });
                }
                temQuery.initTemEvent(defProps, serverPath, setter);
            } else if (modetype === '1') {
                // updateTr(copyObj, copyHtm);
            }

            common.uploadfun("#" + "fSkillcerfileList" + count,{
                acceptMime:'${wjszsdsxlx}',
                exts:'${fileManagementUploadType}',
                secSelect:secSelect,
                isSub:true
            })
            form.render();
            lay('.datetime').each(function () {
                laydate.render({
                    elem: this
                    , type: 'date'
                    , trigger: 'click'
                });
            });
            $(".datetime").removeAttr("lay-key");
            publicMethods.bottomFixd()
        });
        var common = layui.common;
        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name:'wQbdQualityReviewDataForm',
            idValue:"${id}",
            primary:"id",
            beforeSubmitFun: function (data) {
                //子表数据
                var sub = [];
                $('table.subFormTable').each(function () {
                    var table = {
                        tableName: $(this).attr('class').split(" ")[1],
                        fields: []
                    };
                    $(this).find('tr.temSpace').each(function (i, item) {    /*修复需要提交隐藏的行数据的bug*/
                        if (i > 1) {
                            var row = {};
                            var objRow = $(this);
                            $("input:text[name^='s:'],input[type='hidden'][name^='s:'],textarea[name^='s:'],select[name^='s:'],ul[name^='m:']", objRow).each(function () {
                                var name = $(this).attr('name').replace(/.*:/, '');
                                row[name] = $(this).val();
                            });
                            row["sort"] = i - 1;
                            table.fields.push(row);
                        }
                    });
                    data.field[table.tableName] = table.fields;
                });


                //- 附件密级不能高于表单密级 开始 ------------------------------------------------------
                var selectMaxVal = 0;
                var formSecretVal = $("[name='secret']").val();
                $(".fileSecLevel select").each(function () {
                    selectMaxVal = selectMaxVal >= $(this).val() ? selectMaxVal : $(this).val();
                });

                if (selectMaxVal > formSecretVal) {
                    layer.msg('附件密级不能高于表单密级。', {icon: 5});
                    return false;
                }
                //- 附件密级不能高于表单密级 结束 ------------------------------------------------------
                $(".uploadFileList").each(function (i, v) {
                    common.constructFileStr(v)
                });
                var files=[];
                //整理上传附件的隐藏域，将提交的字符串转为json对象
                $(".uploadInput").each(function () {
                    var uploadName = $(this).attr("name");
                    if (!$(this).val()) {
                        return;
                    }
                    data.field[uploadName] = eval($(this).val());
                    files=files.concat(eval($(this).val()));
                });

                return common.setFileLevel(files);

            },
            getCallback: function (data) {
                // $("input[name='dutyperson']").attr("ids", data.data.dutypersonid);
                $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span><span class='qbdms-TBinformationText'>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</span>");
                $('.uploadFileList').each(function () {
                    var fileUploadName = $(this).attr("fileUploadName");
                    var jsonFile = data.data[fileUploadName];
                    var files = eval(jsonFile);
                    if (files) {
                        for (var i = 0; i < files.length; i++) {
                            var fileLevel = files[i].fileLevel;
                            var fileLevelText = files[i].fileLevelText;
                            var fileSec = '<div class="fileSecLevel fileSecXg layui-input-inline">' + '<@secSelect.sec_select data_src=1 hasBlank=false/>' + "</div>";
                            var newStr = '<span class="file-id" style="margin-right: 20px;" fileId=' + files[i].fileId + ' fileLevelText="' + fileLevelText + '">' + fileSec + '<span class="file-name" title="点击下载文件" onclick="downFile(this)"><i class="iconfont" style="margin-right: 5px"></i>' + files[i].fileName + '</span></span>';
                            $(this).html(newStr);
                            $(this).find("select:last").val(fileLevel);
                            $(this).find("select:last").attr("disabled", "disabled");
                        }
                    } else {
                        $(this).html("<span style='color: #c0c4cc'>未上传</span>");
                    }
                });

                $('table.subFormTable').each(function () {
                    // console.log($(this).attr('class').split(" ")[1]);
                    var table = {
                        tableName: $(this).attr('class').split(" ")[1],
                        fields: []
                    };
                    table.fields = data.data[table.tableName];
                    if(table.fields.length > 0){
                        for (var i = 0, len = table.fields.length; i < len; i++) {
                            var dataRow = table.fields[i];
                            var temp = $("." + table.tableName).prev().click();
                            //这里有子表表头占一行，子表隐藏行占一行，所以取需要赋值的行时，需要temp=i+2
                            var domRow = $(this).find("tr.temSpace:eq(" + (i * 1 + 2) + ")");
                            $.each(dataRow, function (j, val) {
                                var domItem = domRow.find("[name$='" + j + "']");
                                if (domItem) {
                                    domItem.val(val);
                                    if(j=="fstandardclauseId"){
                                        setSubStandardClauseList(val,i+1);
                                    }

                                }
                            });
                        }
                    }
                });
                form.render();
            },
            updateCallback:function (data) {
                if((flowStatus==0||flowStatus==""||null==flowStatus)&&runFlag==true){
                    run(data.data.id);
                }
                if (publicMethods._filterRecord(data)) {
                    if ($(".privateSubmit")) {
                        $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
                    }
                    if((flowStatus=="0" || flowStatus==null||flowStatus==""||flowStatus=="99")&&runFlag==false) {
                        layer.alert(publicMethods.confirmStyle(data.msg),
                            {title: false, skin: 'confirm-class'}, function (index) {
                                layer.close(index);
                                window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
                            });
                    }
                } else {
                    if((flowStatus=="0" || flowStatus==null||flowStatus==""||flowStatus=="99")&&runFlag==false) {
                        layer.alert(publicMethods.confirmStyle(data.msg),
                            {title: false, skin: 'confirm-class'}, function (index) {
                                layer.close(index);
                                window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
                            });
                    }
                }
                runFlag=false;
                return false;
            }
        });

        var psjbList = eval('${psjbList}'); //评审级别
        common.initDicData("reviewlevel", psjbList);
        var psjlList = eval('${psjlList}'); //评审结论
        common.initDicData("reviewresult", psjlList);
        var pslbList = eval('${pslbList}'); //评审类别
        common.initDicData("reviewcategory", pslbList);
        var sfczwtList = eval('${sfczwtList}'); //是否存在问题
        common.initDicData("hasproblem", sfczwtList);
        var zyList = eval('${zyList}'); //专业
        common.initDicData("major", zyList);

        form.render("select");

        var secSelect = '<@secSelect.sec_select data_src=1 hasBlank=false/>'
        common.uploadfun(".fileUpload", {
            acceptMime: 'application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            exts: "doc|docx|pdf",
            secSelect: secSelect,
            isSub: false,
            upLoadSize:102400,
            upLoadNumber: 1,
            isMultiFile: false
        });

        publicMethods.bottomFixd()
        form.on('select', function (data) {
            publicMethods.bottomFixd()
        });
        form.render();

        $("#run").click(function () {
            var flag=form.VerifyForm("wQbdQualityReviewDataForm");
            if(flag==false){
                return false;
            }
            runFlag=true;
            $("#urlFormSave").click();
        })
        function run(id) {
            var id = id;
            var fillman = $("input[name='fillman']").val();
            var filldept = $("input[name='filldept']").val();
            var filldate = $("input[name='filldate']").val();
            var fillmanaccount = $("input[name='fillmanaccount']").val();
            var filldeptid = $("input[name='filldeptid']").val();
            var filldepthospital = $("input[name='filldepthospital']").val();
            var filldepthospitalid = $("input[name='filldepthospitalid']").val();
            var belongdeptname = $("input[name='belongdeptname']").val();
            var secret = $("input[name='secret']").val();
            var model = $("input[name='model']").val();
            var major = $("input[name='major']").val();
            var reviewdate = $("input[name='reviewdate']").val();
            var reviewprojectname = $("input[name='reviewprojectname']").val();
            var dutydept = $("input[name='dutydept']").val();
            var dutydeptid = $("input[name='dutydeptid']").val();
            var reviewlevel = $("input[name='reviewlevel']").val();
            var reviewplace = $("input[name='reviewplace']").val();
            var reviewresult = $("input[name='reviewresult']").val();
            var reviewcategory = $("input[name='reviewcategory']").val();
            var hasproblem = $("input[name='hasproblem']").val();
            var supportdoc = $("input[name='supportdoc']").val();
            var probleminfo = $("input[name='probleminfo']").val();
            var finishtime = $("input[name='finishtime']").val();
            var dutyperson = $("input[name='dutyperson']").val();
            var dutypersonid = $("input[name='dutypersonid']").val();
            var solution = $("input[name='solution']").val();
            var finishstatus = $("input[name='finishstatus']").val();
            var tenantId = $("input[name='tenantId']").val();
            var createBy = $("input[name='createBy']").val();
            var createTime = $("input[name='createTime']").val();
            var updateBy = $("input[name='updateBy']").val();
            var updateTime = $("input[name='updateTime']").val();
            var flowStatus = $("input[name='flowStatus']").val();
            var nowData = {"id": id,"fillman": fillman,"filldept": filldept,"filldate": filldate,"fillmanaccount": fillmanaccount,"filldeptid": filldeptid,"filldepthospital": filldepthospital,"filldepthospitalid": filldepthospitalid,"belongdeptname": belongdeptname,"secret": secret,"model": model,"major": major,"reviewdate": reviewdate,"reviewprojectname": reviewprojectname,"dutydept": dutydept,"dutydeptid": dutydeptid,"reviewlevel": reviewlevel,"reviewplace": reviewplace,"reviewresult": reviewresult,"reviewcategory": reviewcategory,"hasproblem": hasproblem,"supportdoc": supportdoc,"probleminfo": probleminfo,"finishtime": finishtime,"dutyperson": dutyperson,"dutypersonid": dutypersonid,"solution": solution,"finishstatus": finishstatus,"tenantId": tenantId,"createBy": createBy,"createTime": createTime,"updateBy": updateBy,"updateTime": updateTime,"flowStatus": flowStatus};
            $.ajax({
                url:"${ctx}/qbdms/wQbdQualityReview/run",
                type: "post",
                dataType: 'json',
                contentType : 'application/json',
                data: JSON.stringify(nowData),
                success : function (data) {
                    if (common.filterRecord(data)) {
                        layer.alert(publicMethods.confirmStyle(data.msg),
                            {title: false, skin: 'confirm-class'}, function (index) {
                                layer.close(index);
                                window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
                            });
                    } else {
                        layer.alert(publicMethods.confirmStyle(data.msg),
                            {title: false, skin: 'confirm-class'}, function (index) {
                                layer.close(index);
                                window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
                            });
                    }
                    return false;
                },
                error : function (XMLHttpRequest, textStatus, errorThrown) {
                    layer.alert(publicMethods.confirmStyle("内容已保存，启动失败"),
                        {title: false, skin: 'confirm-class'}, function (index) {
                            layer.close(index);
                            window.location.href = '${ctx}/qbdms/wQbdQualityReview/view/list';
                        });
                }
            })
        }
    });
</script>
</body>
</html>